package com.szly.phm.admin.exception;

import com.szly.phm.common.entity.result.CodeStatusEnum;
import lombok.Data;

@Data
public class PzhcisPcException extends RuntimeException{

    private static final long serialVersionUID = 1L;

    private String code;

    protected CodeStatusEnum codeStatusEnum;

    public PzhcisPcException() {
    }

    public PzhcisPcException(String code,String message) {
        super(message);
        this.code = code;
    }

    public PzhcisPcException(CodeStatusEnum codeStatusEnum) {
        super(codeStatusEnum.getMessage());
        this.codeStatusEnum = codeStatusEnum;
        this.code = codeStatusEnum.getCode();
    }

    public PzhcisPcException(String message, Throwable throwable) {
        super(message, throwable);
    }

    public PzhcisPcException(Throwable throwable) {
        super(throwable);
    }
}
